home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00825_SU-RN en.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  7.3 KB  |  194 lines

  1. on renseigne txt1, sty1, txt2, sty2, nCurs
  2.   set the textStyle of field "ZI4" to sty1
  3.   set the text of field "ZI4" to txt1
  4.   set the text of field "ZI5" to " "
  5.   set the textStyle of field "ZI5" to "plain"
  6.   set the textStyle of field "ZI5" to sty2
  7.   set the foreColor of cast "ZI5" to the foreColor of cast "jaune"
  8.   set the text of field "ZI5" to txt2
  9.   curseur(nCurs)
  10. end
  11.  
  12. on renseigne_env Quel_Env
  13.   global gEtatEtud, gCodEnv, gNumEnv, gNomBestEnv, gTraduit
  14.   if Quel_Env <> 0 then
  15.     set moncod to getAt(gCodEnv, Quel_Env)
  16.     set monNum to getAt(gNumEnv, Quel_Env)
  17.   else
  18.     set moncod to gEtatEtud
  19.     set maPos to getPos(gCodEnv, moncod)
  20.     set monNum to getAt(gNumEnv, maPos)
  21.   end if
  22.   if char 1 of moncod <> " " then
  23.     set monnom to getAt(gNomBestEnv, monNum)
  24.     if char 1 of monnom = "+" then
  25.       set the textStyle of field "ZI5" to "bold,italic"
  26.     else
  27.       set the textStyle of field "ZI5" to "plain"
  28.       set the textStyle of field "ZI5" to "bold"
  29.     end if
  30.     if Quel_Env <> 0 then
  31.       if gEtatEtud = moncod then
  32.         set the foreColor of cast "ZI5" to the foreColor of cast "rouge"
  33.         curseur(7)
  34.       else
  35.         set the foreColor of cast "ZI5" to the foreColor of cast "vert"
  36.         if Quel_Env = 2 then
  37.           curseur(1)
  38.         else
  39.           curseur(7)
  40.         end if
  41.       end if
  42.     else
  43.       set the foreColor of cast "ZI5" to the foreColor of cast "JAUNE"
  44.       set the text of cast "ZI4" to getAt(gTraduit, 66)
  45.       curseur(1)
  46.     end if
  47.     put " " into char 1 of monnom
  48.     set the text of cast "ZI5" to monnom
  49.   end if
  50. end
  51.  
  52. on exitFrame
  53.   global gLocLabel
  54.   go(label(gLocLabel))
  55. end
  56.  
  57. on idle
  58.   global gBarChron, gSurvolAct, gSurvolPrec, gListSuj, gMaxBoutons, gEtaSpir, gSujet0, gSujet1, g1erSprChr, g1erSprNav, g1erSprLoc, gListCod, gEtudAct, gEtatEtud, gMessDef1, gMessDef2, gMessSty1, gMessSty2, gSprVideo1, gActVideo1, gPartie, gTraduit
  59.   if not (the mouseDown) then
  60.     set MsCast to the mouseCast
  61.     if MsCast > 0 then
  62.       if not gEtaSpir then
  63.         set gSurvolAct to 0
  64.         repeat with monSpr = g1erSprChr to gMaxBoutons
  65.           if rollOver(monSpr) and (the castNum of sprite monSpr <> 0) and the visible of sprite monSpr then
  66.             set gSurvolAct to monSpr
  67.             exit repeat
  68.           end if
  69.         end repeat
  70.         if gSurvolAct <> gSurvolPrec then
  71.           if gSurvolAct <> 0 then
  72.             if (gSurvolAct >= g1erSprChr) and (gSurvolAct <= (g1erSprChr + 9)) then
  73.               gBarChron(survol, gSurvolAct, the number of cast "ZI4")
  74.             end if
  75.             if gSurvolAct = g1erSprNav then
  76.               renseigne(getAt(gTraduit, 12), "bold", " ", gMessSty2, 1)
  77.             end if
  78.             if gSurvolAct = (g1erSprNav + 1) then
  79.               renseigne(getAt(gTraduit, 26) && getAt(gTraduit, 3), "bold", " ", gMessSty2, 7)
  80.             end if
  81.             if gSurvolAct = (g1erSprNav + 2) then
  82.               renseigne(getAt(gTraduit, 1) && getAt(gTraduit, 2) && getAt(gTraduit, 5), "bold", " ", gMessSty2, 7)
  83.             end if
  84.             if gSurvolAct = (g1erSprNav + 3) then
  85.               renseigne(getAt(gTraduit, 1) && getAt(gTraduit, 2) && getAt(gTraduit, 4), "bold", " ", gMessSty2, 7)
  86.             end if
  87.             if gSurvolAct = (g1erSprNav + 4) then
  88.               renseigne(getAt(gTraduit, 1) && getAt(gTraduit, 2) && getAt(gTraduit, 7), "bold", " ", gMessSty2, 7)
  89.             end if
  90.             if gSurvolAct = (g1erSprNav + 5) then
  91.               renseigne(getAt(gTraduit, 27), "bold", " ", gMessSty2, 1)
  92.             end if
  93.             if gSurvolAct = (g1erSprNav + 6) then
  94.               renseigne(getAt(gTraduit, 28), "bold", " ", "bold", 1)
  95.             end if
  96.             if (gSurvolAct >= (g1erSprLoc + 4)) and (gSurvolAct <= (g1erSprLoc + 5)) then
  97.               set monAct to word 1 of the name of cast MsCast
  98.               set monEtat to word 2 of the name of cast MsCast
  99.               set monTxt1 to " "
  100.               set monTxt2 to " "
  101.               set monCur to -1
  102.               if monEtat = "0" then
  103.                 set monTxt1 to getAt(gTraduit, 36)
  104.                 set monTxt2 to gSujet0(Le_Nom)
  105.                 set monCur to 7
  106.               else
  107.                 if monEtat = "1" then
  108.                   set monTxt1 to getAt(gTraduit, 37)
  109.                   set moncod to gSujet0(Le_NumPar)
  110.                   set monSuj to getAt(gListSuj, moncod)
  111.                   set monTxt2 to monSuj(Le_Nom)
  112.                   set monCur to 7
  113.                 else
  114.                   nothing()
  115.                 end if
  116.               end if
  117.               renseigne(monTxt1, "bold", monTxt2, "bold italic", monCur)
  118.             end if
  119.             if (gSurvolAct >= g1erSprLoc) and (gSurvolAct <= (g1erSprLoc + 3)) then
  120.               set monAct to char 3 to 4 of word 1 of the name of cast MsCast
  121.               set monTxt1 to " "
  122.               set monTxt2 to " "
  123.               set monCur to 1
  124.               if (monAct = "SU") or (monAct = "CO") or (monAct = "HI") or (monAct = "EN") then
  125.                 if gEtudAct = monAct then
  126.                   set monTxt1 to getAt(gTraduit, 40)
  127.                   set monCur to 7
  128.                 else
  129.                   set monTxt1 to getAt(gTraduit, 41)
  130.                 end if
  131.                 if monAct = "SU" then
  132.                   set monTxt2 to getAt(gTraduit, 32)
  133.                 end if
  134.                 if monAct = "CO" then
  135.                   set monTxt2 to getAt(gTraduit, 33)
  136.                 end if
  137.                 if monAct = "HI" then
  138.                   set monTxt2 to getAt(gTraduit, 34)
  139.                   set monCur to 7
  140.                 end if
  141.                 if monAct = "EN" then
  142.                   set monTxt2 to getAt(gTraduit, 35)
  143.                 end if
  144.                 renseigne(monTxt1, "bold", monTxt2, "bold", monCur)
  145.               end if
  146.             end if
  147.             if (gSurvolAct >= (g1erSprLoc + 6)) and (gSurvolAct <= (g1erSprLoc + 7)) then
  148.               set nomBt to word 1 of the name of cast MsCast
  149.               if nomBt = "BTGEJC" then
  150.                 renseigne(getAt(gTraduit, 48), "bold", " ", "bold", 1)
  151.               end if
  152.               if nomBt = "BTGOEI" then
  153.                 renseigne_env(0)
  154.               end if
  155.               if nomBt = "BTGVID" then
  156.                 renseigne(getAt(gTraduit, 65), "bold", "<ΓÇö", "bold", 7)
  157.               end if
  158.             end if
  159.             if (gSurvolAct >= (g1erSprLoc + 8)) and (gSurvolAct <= (g1erSprLoc + 11)) then
  160.               set numact to charToNum(char 4 of the name of cast the castNum of sprite gSurvolAct) - 48
  161.               renseigne_env(numact)
  162.             end if
  163.           else
  164.             set monEpok to gSujet0(Le_Epoque)
  165.             gBarChron(fleche, 1, monEpok, 0)
  166.             if gSujet1 <> 0 then
  167.               set monEpok2 to gSujet1(Le_Epoque)
  168.               gBarChron(fleche, 1, monEpok2, 1)
  169.             else
  170.               gBarChron(fleche, 0, monEpok, 1)
  171.             end if
  172.             renseigne(gMessDef1, gMessSty1, gMessDef2, gMessSty2, -1)
  173.           end if
  174.           set gSurvolPrec to gSurvolAct
  175.         end if
  176.       else
  177.         if MsCast > 0 then
  178.           if the number of words in the name of cast MsCast = 2 then
  179.             if (word 2 of the name of cast MsCast = "1") or (word 2 of the name of cast MsCast = "0") then
  180.               curseur(1)
  181.             else
  182.               curseur(-1)
  183.             end if
  184.           else
  185.             curseur(-1)
  186.           end if
  187.         else
  188.           curseur(-1)
  189.         end if
  190.       end if
  191.     end if
  192.   end if
  193. end
  194.